<template>
    <el-pagination 
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="pagination.current"
            :page-sizes="[5,10,15,20,25]"
            :page-size.sync="pagination.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="pagination.total">
    </el-pagination>
</template>
<script>
export default {
    props:['pagination'],
    methods: {
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
            this.$emit('show',{pageSize:val});
        },
        handleCurrentChange(val) {
            console.log(`当前页: ${val}`,this.pagination.pageSize);
            this.$emit('show',{current:val,pageSize:this.pagination.pageSize});
        }
    },
}
</script>
<style>

</style>